package com.whales.shared.service;

import org.springframework.stereotype.Service;

import com.whales.shared.model.LoginVO;

@Service
public class LoginService extends GenericService<LoginVO, LoginVO> {
	@Override
	public LoginVO findInfo(LoginVO vo) throws Exception {
		return super.findInfo("login.checkLogin",vo);
	}
	
	public String createLogin(LoginVO vo) throws Exception {
		vo.setNewId(super.getNewId());
		super.create("login.createLogin",vo);
		this.createLoginHistory(vo);
		return vo.getNewId();
	}
	
	private int createLoginHistory(LoginVO vo) throws Exception{
		return super.create("login.createLoginHistory", vo);
	}
}
